# -*- coding: utf-8 -*-#
#-------------------------------------------------------------------------------
# 建立者:        黄周云  
# Name:         test13
# Description:  例11.11
# Author:       ASUS
# Date:         2019/3/26
#-------------------------------------------------------------------------------


import re
result = re.split(";","Bill;Mike;John")
print(result)
#空白符\s
result = re.split("[,;.\s]+","a,b,,d,d;x   c;d.  e")
print(result)
result = re.split("[a-z]{3}-[0-9]{2}","testabc-4321productxyz-43abill")
print(result)
#用maxsplit关键字指定最大分割次数
result = re.split("[a-z]{3}-[0-9]{2}","testabc-4321productxyz-43abill",maxsplit=1)
print(result)


